package com.edu.service;

import com.edu.dao.SuggestionMapper;
import com.edu.pojo.Suggestion;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public class SuggestionServiceImpl implements SuggestionService{
    private SuggestionMapper suggestionMapper;

    public void setSuggestionMapper(com.edu.dao.SuggestionMapper suggestionMapper) {
        this.suggestionMapper = suggestionMapper;
    }

    public int addSuggestion(Suggestion suggestion) {
        return suggestionMapper.addSuggestion(suggestion);
    }

    public List<Suggestion> queryAllSuggestion() {
        return suggestionMapper.queryAllSuggestion();
    }

    public int deleteSuggestionById(int id) {
        return suggestionMapper.deleteSuggestionById(id);
    }

    public  int addReply(String reply,int id){
        return suggestionMapper.addReply(reply,id);
    }

    public Suggestion querySuggestionById( int id) {
        return suggestionMapper.querySuggestionById(id);
    }
}
